package com.yang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
public class HelloController {
    @RequestMapping("/hello")
    public String hello(Model model, HttpServletResponse rsp, HttpServletRequest req){
        model.addAttribute("name","yty");
        req.setAttribute("name1","狗子");
        return "hello";
    }
}
